package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.NumberBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetNumberMethods extends BaseMethods {

    private static GetNumberMethods m_ins = null;

    public static GetNumberMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetNumberMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetNumberMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Index/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void get_mobile(Subscriber<NumberBean> subscriber ) {
        Observable observable = initService().get_mobile(System.currentTimeMillis()+"",
                "70ffcb2a3569065c4420776b8a81809b"
        );
        toSubscribe(observable, subscriber);
    }
}
